<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="apple-mobile-web-app-capable" content="no"/>
    <meta name="wap-font-scale" content="no">
    <meta content="telephone=no" name="format-detection">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>个人中心-上传设计</title>
    <link rel="stylesheet" href="css/cropper.min.css">
    <link rel="stylesheet" href="css/font-awesome.min.css">
    <link rel="stylesheet" href="css/sliderBox.float.css">
    <link rel="stylesheet" href="css/jBox.css">
    <link rel="stylesheet" href="css/base.min.css">
    <link rel="stylesheet" href="css/user.min.css">
</head>
<body>
<div class="wrap gray">
    <div class="head-box">
        <div class="header static">
            <div class="container">
                <div class="row">
                    <div class="logo-box">
                        <a class="logo" href="index.html"><img src="img/logo.png"></a>
                        <div class="area-box">
                            <div class="fb-select-box fn-hover-bar">
                                <label class="hd">
                                    <i class="glyphicon glyphicon-map-marker"></i>
                                    <span id="cityName">重庆市</span>
                                    <em class="glyphicon glyphicon-triangle-bottom"></em>
                                </label>
                                <div class="bd fn-hover-menu">
                                    <div class="city-box">
                                        <div class="title clearfix">
                                            <a href="javascript:;" class="active">热门城市</a>
                                            <a href="javascript:;">ABCD</a>
                                            <a href="javascript:;">FGHJ</a>
                                            <a href="javascript:;">KLMN</a>
                                            <a href="javascript:;">QSTW</a>
                                            <a href="javascript:;">XYZ</a>
                                        </div>
                                        <div class="cont">
                                            <div class="item active">
                                                <div class="city-list clearfix">
                                                    <a href="javascript:;">北京市</a>
                                                    <a href="javascript:;">上海市</a>
                                                    <a href="javascript:;">广州市</a>
                                                    <a href="javascript:;">深圳市</a>
                                                    <a href="javascript:;">成都市</a>
                                                    <a href="javascript:;">重庆市</a>
                                                    <a href="javascript:;">武汉市</a>
                                                    <a href="javascript:;">沈阳市</a>
                                                    <a href="javascript:;">大连市</a>
                                                    <a href="javascript:;">郑州市</a>
                                                    <a href="javascript:;">西安市</a>
                                                    <a href="javascript:;">南京市</a>
                                                    <a href="javascript:;">苏州市</a>
                                                    <a href="javascript:;">无锡市</a>
                                                    <a href="javascript:;">徐州市</a>
                                                    <a href="javascript:;">杭州市</a>
                                                    <a href="javascript:;">宁波市</a>
                                                    <a href="javascript:;">天津市</a>
                                                    <a href="javascript:;">昆明市</a>
                                                    <a href="javascript:;">南宁市</a>
                                                    <a href="javascript:;">合肥市</a>
                                                    <a href="javascript:;">长沙市</a>
                                                    <a href="javascript:;">青岛市</a>
                                                    <a href="javascript:;">哈尔滨市</a>
                                                    <a href="javascript:;">兰州市</a>
                                                    <a href="javascript:;">东莞市</a>
                                                    <a href="javascript:;">惠州市</a>
                                                    <a href="javascript:;">佛山市</a>
                                                    <a href="javascript:;">贵阳市</a>
                                                    <a class="active" href="javascript:;">[ 更多 ]</a>
                                                </div>
                                            </div>
                                            <div class="item">
                                                <div class="city-list clearfix">
                                                    <a href="javascript:;">北京市</a>
                                                    <a href="javascript:;">上海市</a>
                                                    <a href="javascript:;">广州市</a>
                                                    <a href="javascript:;">深圳市</a>
                                                    <a href="javascript:;">成都市</a>
                                                    <a href="javascript:;">重庆市</a>
                                                    <a href="javascript:;">武汉市</a>
                                                    <a href="javascript:;">沈阳市</a>
                                                    <a href="javascript:;">大连市</a>
                                                    <a href="javascript:;">郑州市</a>
                                                    <a href="javascript:;">西安市</a>
                                                    <a href="javascript:;">南京市</a>
                                                    <a href="javascript:;">苏州市</a>
                                                    <a href="javascript:;">无锡市</a>
                                                </div>
                                            </div>
                                            <div class="item">
                                                <div class="city-list clearfix">
                                                    <a href="javascript:;">徐州市</a>
                                                    <a href="javascript:;">杭州市</a>
                                                    <a href="javascript:;">宁波市</a>
                                                    <a href="javascript:;">天津市</a>
                                                    <a href="javascript:;">昆明市</a>
                                                    <a href="javascript:;">南宁市</a>
                                                    <a href="javascript:;">合肥市</a>
                                                    <a href="javascript:;">长沙市</a>
                                                    <a href="javascript:;">青岛市</a>
                                                    <a href="javascript:;">哈尔滨市</a>
                                                    <a href="javascript:;">兰州市</a>
                                                    <a href="javascript:;">东莞市</a>
                                                    <a href="javascript:;">惠州市</a>
                                                    <a href="javascript:;">佛山市</a>
                                                </div>
                                            </div>
                                            <div class="item">
                                                <div class="city-list clearfix">
                                                    <a href="javascript:;">徐州市</a>
                                                    <a href="javascript:;">杭州市</a>
                                                    <a href="javascript:;">宁波市</a>
                                                    <a href="javascript:;">天津市</a>
                                                </div>
                                            </div>
                                            <div class="item">
                                                <div class="city-list clearfix">
                                                    <a href="javascript:;">哈尔滨市</a>
                                                    <a href="javascript:;">兰州市</a>
                                                    <a href="javascript:;">东莞市</a>
                                                    <a href="javascript:;">惠州市</a>
                                                    <a href="javascript:;">佛山市</a>
                                                </div>
                                            </div>
                                            <div class="item">
                                                <div class="city-list clearfix">
                                                    <a href="javascript:;">哈尔滨市</a>
                                                    <a href="javascript:;">兰州市</a>
                                                    <a href="javascript:;">东莞市</a>
                                                    <a href="javascript:;">惠州市</a>
                                                    <a href="javascript:;">佛山市</a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="nav-box">
                        <ul>
                            <li class="active"><a href="index.html">首页</a></li>
                            <li><a href="afflatus.html">装修灵感</a></li>
                            <li><a href="stylist.html">在线服务</a></li>
                            <li><a href="originality.html">创意工坊</a></li>
                            <li><a href="design.html">3D设计</a></li>
                        </ul>
                        <div class="login-register login">
                            <a class="user" href="personal.html">
                                <img src="img/stylist-headImg.jpg">
                            </a>
                            <a class="quit" href="javascript:;">退出</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="cont-box">
        <div class="container">
            <div class="row">
                <div class="personal-container">
                    <div class="left-bg"></div>
                    <div class="right-bg"></div>
                    <div class="p-slide-box">
                        <div class="fb-slide-nav">
                            <div class="son-nav">
                                <label class="title">个人中心</label>
                                <ul>
                                    <li><a href="stylist-details.html"><i class="fb-arrow-dir right"></i>我的主页</a></li>
                                    <li><a href="mine-design-stylist.html"><i class="fb-arrow-dir right"></i>我的设计</a>
                                    </li>
                                    <li><a href="mine-commission.html"><i class="fb-arrow-dir right"></i>我的佣金</a></li>
                                    <li><a href="commission-rule.html"><i class="fb-arrow-dir right"></i>佣金规则</a></li>
                                    <li><a href="mine-message.html"><i
                                            class="fb-arrow-dir right"></i>我的消息<em>12</em></a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="p-cont-box">
                        <div class="personal-cont-box">
                            <div class="p-c-title"><span>我的设计</span><em></em></div>
                            <div class="p-c-cont mt-40">
                                <div class="p-intro-form">
                                    <div class="fb-form-list">
                                        <div class="item">
                                            <label class="title">标题：</label>
                                            <div class="cont">
                                                <label class="form-input border gray clean width">
                                                    <input type="text" placeholder="请输入标题">
                                                    <a class="clean-btn" href="javascript:;">×</a>
                                                </label>
                                            </div>
                                        </div>
                                        <div class="item z-index-big">
                                            <label class="title">城市：</label>
                                            <div class="cont">
                                                <label class="fb-select-bar" id="province">
                                                    <select>
                                                        <option value="0">选择省市</option>
                                                        <option value="1" selected>北京</option>
                                                        <option value="2">上海</option>
                                                        <option value="3">重庆</option>
                                                        <option value="1">北京</option>
                                                        <option value="2">上海</option>
                                                        <option value="3">重庆</option>
                                                    </select>
                                                </label>
                                                <label class="fb-select-bar" id="city">
                                                    <select>
                                                        <option value="0" selected>选择市区</option>
                                                    </select>
                                                </label>
                                            </div>
                                        </div>
                                        <div class="item z-index-40">
                                            <label class="title">楼盘：</label>
                                            <div class="cont">
                                                <div class="input-search-box">
                                                    <label class="form-input border gray clean width">
                                                        <input type="text" placeholder="请输入楼盘">
                                                        <a class="clean-btn" href="javascript:;">×</a>
                                                    </label>
                                                    <div class="input-search-cont">
                                                        <a href="javascript:;" class="match-none">没找到？立即添加</a>
                                                        <a href="javascript:;">搜索结果01</a>
                                                        <a href="javascript:;">搜索结果02</a>
                                                        <a href="javascript:;">搜索结果03</a>
                                                        <a href="javascript:;">搜索结果04</a>
                                                        <a href="javascript:;">搜索结果05</a>
                                                        <a href="javascript:;">搜索结果06</a>
                                                        <a href="javascript:;">搜索结果07</a>
                                                    </div>
                                                    <div class="match-none-tips fn-hover-bar">
                                                        <i class="fb-sprite icon-cause big"></i>
                                                        <label class="fn-hover-menu">您自行添加的楼盘只有填写正确完整的楼盘名称才有可能审核通过哦。</label>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="item z-index-normal">
                                            <label class="title">建筑类型：</label>
                                            <div class="cont">
                                                <label class="fb-select-bar normal">
                                                    <select>
                                                        <option value="0">建筑类型</option>
                                                        <option value="1" selected>家居住宅</option>
                                                        <option value="2">家居住宅</option>
                                                        <option value="3">家居住宅</option>
                                                        <option value="1">家居住宅</option>
                                                        <option value="2">家居住宅</option>
                                                        <option value="3">家居住宅</option>
                                                    </select>
                                                </label>
                                            </div>
                                        </div>
                                        <div class="item">
                                            <label class="title">风格：</label>
                                            <div class="cont">
                                                <div class="check-list-box">
                                                    <label class="fb-check-box">
                                                        <em class="">
                                                            <i class="fb-sprite icon-checked"></i>
                                                            <input type="checkbox" name="style">
                                                        </em>
                                                        <span>现代简约</span>
                                                    </label>
                                                    <label class="fb-check-box">
                                                        <em class="">
                                                            <i class="fb-sprite icon-checked"></i>
                                                            <input type="checkbox" name="style">
                                                        </em>
                                                        <span>新中式</span>
                                                    </label>
                                                    <label class="fb-check-box">
                                                        <em class="">
                                                            <i class="fb-sprite icon-checked"></i>
                                                            <input type="checkbox" name="style">
                                                        </em>
                                                        <span>北欧</span>
                                                    </label>
                                                    <label class="fb-check-box">
                                                        <em class="">
                                                            <i class="fb-sprite icon-checked"></i>
                                                            <input type="checkbox" name="style">
                                                        </em>
                                                        <span>欧式</span>
                                                    </label>
                                                    <label class="fb-check-box">
                                                        <em class="">
                                                            <i class="fb-sprite icon-checked"></i>
                                                            <input type="checkbox" name="style">
                                                        </em>
                                                        <span>田园</span>
                                                    </label>
                                                    <label class="fb-check-box">
                                                        <em class="">
                                                            <i class="fb-sprite icon-checked"></i>
                                                            <input type="checkbox" name="style">
                                                        </em>
                                                        <span>地中海</span>
                                                    </label>
                                                    <label class="fb-check-box">
                                                        <em class="">
                                                            <i class="fb-sprite icon-checked"></i>
                                                            <input type="checkbox" name="style">
                                                        </em>
                                                        <span>简欧</span>
                                                    </label>
                                                    <label class="fb-check-box">
                                                        <em class="">
                                                            <i class="fb-sprite icon-checked"></i>
                                                            <input type="checkbox" name="style">
                                                        </em>
                                                        <span>日式</span>
                                                    </label>
                                                    <label class="fb-check-box">
                                                        <em class="">
                                                            <i class="fb-sprite icon-checked"></i>
                                                            <input type="checkbox" name="style">
                                                        </em>
                                                        <span>美式</span>
                                                    </label>
                                                    <label class="fb-check-box">
                                                        <em class="">
                                                            <i class="fb-sprite icon-checked"></i>
                                                            <input type="checkbox" name="style">
                                                        </em>
                                                        <span>混搭</span>
                                                    </label>
                                                    <label class="fb-check-box">
                                                        <em class="">
                                                            <i class="fb-sprite icon-checked"></i>
                                                            <input type="checkbox" name="style">
                                                        </em>
                                                        <span>简美</span>
                                                    </label>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="item">
                                            <label class="title">套内面积：</label>
                                            <div class="cont">
                                                <label class="form-input border gray clean after-text">
                                                    <input type="text" placeholder="请输入套内面积">
                                                    <a class="clean-btn" href="javascript:;">×</a>
                                                    <em>㎡</em>
                                                </label>
                                            </div>
                                        </div>
                                        <div class="item">
                                            <label class="title">整体报价：</label>
                                            <div class="cont">
                                                <label class="form-input border gray clean after-text">
                                                    <input type="text" placeholder="请输入整体报价">
                                                    <a class="clean-btn" href="javascript:;">×</a>
                                                    <em>元</em>
                                                </label>
                                            </div>
                                        </div>
                                        <div class="item">
                                            <label class="title">上传设计图：</label>
                                            <div class="cont">
                                                <!--<a href="javascript:;" class="img-ewm img-design uploaded">
                                                    <label><img
                                                            src="http://n.sinaimg.cn/news/transform/20171114/EtzN-fynship2400663.jpg"></label>
                                                    <span>辅图</span><em class="close upload-close">×</em>
                                                </a>-->
                                                <div class="img-ewm img-design upload" id="uploadDesignImage">
                                                    <div class="d-table d-height">
                                                        <div class="cell cursor-pointer" id="uploadHeadImg"
                                                             data-type="design">
                                                            <label>
                                                                <span>+</span>
                                                                <em>本地上传<br>图片作品</em>
                                                            </label>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="item">
                                            <label class="title">设计理念：</label>
                                            <div class="cont">
                                                <label class="form-input border gray text width">
                                                    <textarea cols="" rows="" placeholder="请输入设计理念"></textarea>
                                                </label>
                                            </div>
                                        </div>
                                        <div class="item">
                                            <div class="cont clearfix">
                                                <a class="fb-btn line gray dark fl mr-30" href="javascript:;">重置信息</a>
                                                <a class="fb-btn line blue active fl" href="javascript:;">提交</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="footer-box mt-0">
        <div class="container">
            <div class="row">
                <div class="footer-cont">
                    <div class="menu">
                        <span><a href="#">商家入驻</a></span>
                        <span><a href="#">商家后台</a></span>
                        <span><a href="VR-custom.html">VR定制</a></span>
                        <span><a href="about-us.html?type=opinion">意见反馈</a></span>
                        <span><a href="about-us.html?type=agreement">用户协议</a></span>
                        <span><a href="about-us.html?type=about">关于我们</a></span>
                        <span><a href="about-us.html?type=job">工作机会</a></span>
                        <span><a href="about-us.html?type=contact">联系我们</a></span>
                        <span><a href="about-us.html?type=map" class="bd-no-right">网站地图</a></span>
                    </div>
                    <div class="intro clearfix">
                        <div class="fl">
                            <p><label><i class="fb-sprite icon-area"></i></label><span>重庆市渝北区嘉州协信中心A栋23层</span></p>
                            <p><label><i class="fb-sprite icon-email"></i></label><span>Sale@19area.cn</span></p>
                            <p><label><i class="fb-sprite icon-phone"></i></label><span>商务合作：<em
                                    class="fs-18">13452828599  /  13647631899</em></span>
                            </p>
                        </div>
                        <div class="fr">
                            <label>
                                <img src="img/ewm.jpg">
                                <span>移动版</span>
                            </label>
                            <label>
                                <img src="img/ewm.jpg">
                                <span>商务合作</span>
                            </label>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <span class="copyright">Copyright© 2017 www.19area.cn 重庆十九地带科技有限公司 版权所有　渝ICP备14009506号</span>
    </div>
</div>
<div class="go-top-box">
    <a href="javascript:;" id="goTop"><i class="fb-sprite icon-top"></i></a>
</div>

<script type="text/template" id="uploadBox">
    <div class="upload-box">
        <div class="view-box">
            <div class="view-cont small">
                <div class="d-table d-height">
                    <div class="cell">
                        <label class="upload-tips" for="uploadHeadBtn">
                            <i>+</i>
                            <span>只支持JPG、PNG，大小不超过5M 建议尺寸为800✖600</span>
                            <input type="file" class="upload-file" id="uploadHeadBtn" accept=".jpg,.jpeg,.png">
                        </label>
                    </div>
                </div>
            </div>
            <div class="view-handle d-hide">
                <label>
                    <a href="javascript:;" data-method="zoom" data-option="0.1">
                        <span class="fa fa-search-plus"></span>
                    </a>
                    <a href="javascript:;" data-method="zoom" data-option="-0.1">
                        <span class="fa fa-search-minus"></span>
                    </a>
                </label>
                <label>
                    <a href="javascript:;" data-method="rotate" data-option="-90">
                        <span class="fa fa-rotate-left"></span>
                    </a>
                    <a href="javascript:;" data-method="rotate" data-option="90">
                        <span class="fa fa-rotate-right"></span>
                    </a>
                </label>
                <label>
                    <label for="resetImage">
                        <span class="fa fa-upload"></span>
                        <input type="file" class="d-hide" id="resetImage" name="file" accept=".jpg,.jpeg,.png">
                    </label>
                </label>
            </div>
        </div>
        <div class="preview-box">
            <label class="fb-check-box radio-style" id="selectHost">
                <em>
                    <i class=""></i>
                    <input type="checkbox" name="sex">
                </em>
                <span>设为主图</span>
            </label>
        </div>
    </div>
    <div class="fb-form-list tm-left mt-20">
        <div class="item z-index-normal">
            <label class="title">请选择房间：</label>
            <div class="cont">
                <label class="fb-select-bar" id="house">
                    <select>
                        <option value="0" selected>请选择房间</option>
                        <option value="1">客厅</option>
                        <option value="2">客厅</option>
                        <option value="3">客厅</option>
                        <option value="1">客厅</option>
                        <option value="2">客厅</option>
                        <option value="3">客厅</option>
                    </select>
                </label>
            </div>
        </div>
        <div class="item mb-0">
            <label class="title">图片介绍：</label>
            <div class="cont">
                <label class="form-input border gray text" style="width: 90%">
                    <textarea cols="" rows="" placeholder="限制30个字以内"></textarea>
                </label>
                <span class="d-block tm-right tc-ccc mt-10 mr-15">0/30字数</span>
            </div>
        </div>
    </div>
</script>
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/cropper.min.js"></script>
<script src="js/jquery.jbox.js"></script>
<script src="js/common.js"></script>
<script src="js/base.js"></script>
<script>
    $(function () {
        //单选
        FB.formChecked(".fb-radio-box");
        //复选
        FB.formChecked(".fb-check-box");
        //模拟下拉框
        $(".fb-select-bar.normal").each(function () {
            FB.selectBar(this);
        });

        //搜索结果
        FB.getInputVal(".input-search-box input", function (val) {
            //输入文本之后的回调
            console.log(val);
            if (val.length > 6) {
                $(".input-search-cont").show();
            }
        });

        $(document).on("click", function (e) {
            var evt = e || window.event;
            evt.stopPropagation();
            var $target = $(evt.target);
            if (!$target.hasClass("input-search-cont") && !$target.parents(".input-search-cont").hasClass("input-search-cont")) {
                $(".input-search-cont").hide();
            }
        });

        $(".input-search-cont a").click(function (e) {
            e.stopPropagation();
            $(".input-search-cont").hide();
            if ($(this).hasClass("match-none")) {
                $(".match-none-tips").show();
                return false;
            }
            $(".match-none-tips").hide();
            $(".input-search-box input").val($(this).text());
        });

        $(".input-search-box input").focus(function () {
            $(".match-none-tips").hide();
        });

        $(".input-search-box input").blur(function (e) {
            e.stopPropagation();
            $(".match-none-tips").show();
        });

        //模拟下拉框-城市联动
        var citySelect = FB.selectBar("#city");
        var provinceSelect = FB.selectBar("#province", {
            selectCallback: function () {
                var str = '';
                for (var i = 0; i < 5; i++) {
                    str += '<option value="' + i + '">' + $(this).text() + i + '</option>';
                }
                $("#city").find("select").empty().append(str);
                citySelect.destroy();
                citySelect = FB.selectBar("#city");
            }
        });

        //点击上传按钮
        $("#uploadHeadImg").click(function () {
            var html = $("#uploadBox").html();
            var hostActive = false;
            uploadCropperImage({
                element: "#uploadHeadBtn",
                html: html,
                title: "上传作品",
                verify: true,
                type: "rect",
                initFun: function () {
                    $("#house").length != 0 && FB.selectBar("#house");
                },
                ensureBefore: function () {
                    hostActive = !!$("#selectHost").hasClass("active");
                },
                ensureFun: function ($image, URL, option) {
                    var $wrap = $("#uploadDesignImage");
                    cropperSureFun(hostActive, URL, option, function (text, data) {
                        var str = '<a href="javascript:;" class="img-ewm img-design uploaded">';
                        str += '<label><img src="' + URL + '"></label>';
                        str += '<span>' + text + '</span>';
                        str += '<em class="close upload-close">×</em>';
                        str += '</a>';

                        $wrap.before(str);
                        //保存数据
                        $wrap.prev().data(data);
                    });
                }
            }, "post");
        });

        //展示上传结果
        $(document).on("click", ".img-design.uploaded", function (e) {
            var evt = e || window.event;
            evt.stopPropagation();
            var self = this;
            var isHost = $(this).data("isHost");
            var roomValue = $(this).data("roomValue");
            var roomText = $(this).data("roomText");
            var imgIntro = $(this).data("imgIntro");
            var imgSrc = $(this).data("imgSrc");
            //var imgSrc = "http://dev19desginerotherfilebucket-1253586543.cosgz.myqcloud.com/滑稽.jpg";

            var html = $("#uploadBox").html();
            var hostActive = false;
            uploadCropperImage({
                element: "#uploadHeadBtn",
                html: html,
                title: "上传作品",
                verify: true,
                type: "rect",
                imgUrl: imgSrc,
                initFun: function () {
                    var $house = $("#house");
                    var $select = $("#selectHost");
                    $house.length != 0 && FB.selectBar("#house");
                    $house.find(".text").text(roomText).data("val", roomValue).removeClass("def");
                    $(".j-disk-t .form-input textarea").val(imgIntro);
                    isHost ? $select.addClass("active") : $select.removeClass("active");
                },
                ensureBefore: function ($image, option) {
                    hostActive = !!$("#selectHost").hasClass("active");
                    var width = $image.cropper("getCropBoxData").width;
                    option.isChange = width !== option.cropper_width;
                    return option;
                },
                ensureFun: function ($image, URL, option) {
                    cropperSureFun(hostActive, URL, option, function (text, data) {
                        $(self).find("span").text(text);
                        $(self).find("img").attr("src", URL);
                        //保存数据
                        $(self).data(data);
                    });
                }
            }, "get");
        });

        //确定裁剪函数
        function cropperSureFun(hostActive, URL, option, callback) {
            var $wrap = $("#uploadDesignImage");
            var $room = $("#house").find(".text");
            var $intro = $(".j-disk-t .form-input textarea");
            //保存数据
            var saveData = {
                isHost: hostActive,
                roomValue: $room.data("val"),
                roomText: $room.text(),
                imgIntro: $intro.val(),
                imgSrc: URL
            };

            console.log(option.isChange);

            //模拟验证
            if ($room.hasClass("def")) {
                $.jBox.error("请选择房间类型！");
                return false;
            }
            if ($intro.val() == "") {
                $.jBox.error("请输入图片描述！");
                return false;
            }

            //验证通过
            $.jBox.closeFun(null, $(".j-box-upload-box"));
            $.jBox.loading("正在上传中，请稍后...", {
                boxCls: "j-box-upload-loading"
            });

            //模拟ajax
            if (option.isChange) {
                setTimeout(function () {
                    $.jBox.closeFun(function () {
                        $.jBox.success("操作成功！", {
                            closeCallback: function () {
                                var text = hostActive ? "主图" : "辅图";
                                if (hostActive) {
                                    $wrap.parent().find(".img-design.uploaded").data({"isHost": false});
                                    $wrap.parent().find(".img-design.uploaded >span").text("辅图");
                                }
                                callback && callback.call(this, text, saveData);
                            }
                        });
                    }, $(".j-box-upload-loading"));
                }, 1000);
            } else {
                setTimeout(function () {
                    $.jBox.closeFun(null, $(".j-box-upload-loading"));
                }, 500);
            }
        }


        //删除上传-模拟
        $(document).on("click", ".upload-close", function (e) {
            var evt = e || window.event;
            evt.stopPropagation();
            $(this).parents(".img-ewm").empty().append('<span class="loading"><i></i>图片加载中</span>').addClass("d-hide");
            $(".upload-btn").removeClass("d-hide");
        });
    })
</script>

</body>
</html>